package com.taoge.p4.common.constants;

public class StatisticsRedisKey {
    public static final String PREFIX = "statistics:";

    /**
     * uv汇总key
     *
     * @param spuSn 商品编号
     */
    public static String getStatisticsUvKey(String spuSn) {
        return PREFIX + "uv:" + spuSn;
    }

    /**
     * uv按天统计
     *
     * @param spuSn 商品编号
     * @param day   yyyyMMdd
     */
    public static String getStatisticsUvDayKey(String spuSn, String day) {
        return PREFIX + "uv:" + spuSn + ":" + day;
    }

    /**
     * uv实时统计（分钟）
     *
     * @param spuSn 商品编号
     */
    public static String getStatisticsUvDetailKey(String spuSn, String day, int hour, int minute) {
        return PREFIX + "uv:" + spuSn + ":" + day + hour + minute;
    }

}
